﻿using Abp.AspNetCore.Mvc.Controllers;
using Batman.Cache.Helpers;
using Castle.Core.Logging;
using Microsoft.AspNetCore.Mvc;

namespace Batman.Jianbei.Forum.Controllers
{
    public class HomeController : AbpController
    {
        public HomeController()
        {

        }

        public IActionResult Index()
        {
            Logger.Error("内存溢出了，小伙子");
            //throw new System.("OH My GOd");
            return Json("?");
        }

        /// <summary>
        /// 开发用的缓存信息
        /// </summary>
        /// <returns></returns>
        public IActionResult CacheInfo()
        {
            var masps = CacheUsageHelper.GetCacheMap();
            if (Request.Method.ToUpper() == "POST")
            {
                return Json(masps);
            }
            return View();
        }
    }
}